import React, { Component } from 'react';
import {Switch, Route, Redirect} from 'react-router-dom';
import ProductHome from './home';
import ProductDetail from './detail';
import Update from './update'
import ProductAddUpdate from './addUpdate';
// 产品界面
class Product extends Component {
    render() {
        return (
            <div style={{ width: '100%',height:'100%' }}>
                <Switch>
                    <Route path='/product' exact={true} component={ProductHome}></Route>
                    <Route path='/product/detail' component={ProductDetail}></Route>
                    <Route path='/product/addUpdate' component={ProductAddUpdate}></Route>
                    <Route path='/product/update' component={Update}></Route>
                    <Redirect to='/product'></Redirect>
                </Switch>
            </div>
        );
    }
}

export default Product;